<p>
<? global $cat, $element; 
	//print_r($cat);
?>
  <select  class="styledselect-day" style="width:200px;" name="comp" id="comp">
    <?php
        global $db;
        $sql = "select id, name from component where active=1 order by id asc";
        $comps = $db->getAll($sql);
        if($comps){
            for($i=0;$i<count($comps);$i++){
    ?>
        <option value="<?=$comps[$i]['id']?>" <?php
            if ($_GET['act'] == 'edit_full')
            {
            if($element['comp']==$comps[$i]['id'])
            {
                print('selected');
            }
            }
            if($_GET['act']=='add_full' && $comps[$i]['name']=='None')
                print('selected');
                                ?>>
        <?=$comps[$i]['name']?>
        </option>
    <?
		}
	}
	?>
    </select>
</p>
